<extend name="layout/edit" />

<block name="HEADER">
	<style type="text/css">
		.xw-form .xw-form-table .sections>div.line{
			padding-bottom: 0;
		}
	</style>
</block>

<block name="CONTENT">
    <control:form id="form"/>
</block>

<block name="FOOTER">
    <script type="text/javascript">
   	
   	var shop_id = <php>echo $userInfo['shop_id'];</php>;
   	
    var  page=(function(ns){
    	
		ns.init = function(){
			
		}
		
        //保存
        ns.save=function(){
        	var data = form.getData();
        	if(!data) return false;
        	if(!data.img) return $.toast(0,'封面必填！');
        	if(!data.imgs) return $.toast(0,'素材内容图必填！');
        	form.save(1).then(function(res){
            	form.opener.grid.load();
            });
        }
        
        return ns;
    }({}));
    
    $(function(){ page.init(); });
   </script>
</block>



